Electrically toggle-able switch?
Figure 1. A solenoid hold-on pushbutton switch by EMC.

There are solutions available but they're likely to be expensive and hard to come by.



Figure 2. Momentary illuminated PBs. Random web image.

Once there's a micro-controller most of us would just use an illuminated momentary pushbutton. Illuminate the LED using a GPIO output when the button is pressed and turn it off when the time is up. The whole world has been conditioned to accept this kind of switch by now.

The only reason I can think of for the solenoid latching switch is that you might need it to maintain its state during a power cycle.