You can't have it update when they press a key, but you could use events 1, 2, 3, and 4 (basically any non-idle event) to reset the wait time.
'Use this code to set the time
minute = 1 / (24 * 60)
waitUntil = now() + (5 * minute)
'Use this code in your wait
if now >= waitUntil then
'do...