Hey there.
Just set up an FSM on an empty Gameobject with a
Wait and
Any Key action. Create a float variable for your time limit and hook it into the Wait action.
When the
Any Key action detects a key press, fire off the Reset Timer event and reset the time limit variable, and if nothing is detected have the
Wait action Finish event fire off the Shutdown event to return to main menu.
You could flesh it out quite easily too. For example you could make the time limit a global and have certain state machines reset the timer, or you could watch the input axes and mouse to have them reset the timer also.
Hope this helps