Led avec bouton et minuterie

This is your problem. Delay(x) locks the microcontroller for x milliseconds. In the example above, the microcontroller will simply not be capable of doing anything (including reading the button status) for the 1800000 milliseconds you locked it.

So instead you want to use something like the example 'blink without delay' which you can find in the Arduino IDE (or via Google). Essentially what you do is store the time when the led goes on using millis(), then keep looking at the button, and turn the led off if more than half an hour has passed OR the button has been pressed. This approach does not use delay() and hence it allows the microcontroller to keep track of the time AND 'listen' to the button at the same time.