Timer Motion

I have lamps that I switch on via a PIR motion detector. Currently they switch on for 300s if motion is detected. They then switch off and if motion is detected again they switch on.

How could the timer reset to the default value everytime motion is detected rather than the timer timing out and switching the lights off