LEDs blinking duration and without motion

Umair_Khalid_Khan:
But before that could you please explain your code a little more?

The idea is to keep the timer at maximum time while the PIR is active. This is done by recording a time 0.3 second in the future.

As long as the timer has a value in the future the output is turned on, when the timer has not been reset for some some time (0.3second) the milles() will be larger than the timer and the output will turn off.
For the digitalWrite I used a boolean parameter instead of HIGH/LOW, this works just as well (TRUE=HIGH, FALSE=LOW).