Time delayed optionally postponable from a second input
This is a perfect problem for a tiny microcontroller.  Even the tiniest and smallest, the PIC 10F200, can do this job easily.  The logic itself is trivial.  The PIC has a built in oscillator so can perform the 5 minute timeout also.  This is really about as simple as it gets.  You don't want to do 5 minute timing in analog electronics, and then you'd still have to implement the logic function separately.

&nbsp;