You have a second IF with no condition.
-Time is not between 7:00:00 AM and 9:00:00 PM
-Lock 1’s status stays ‘unlocked’ for 15 minutes
also… instead of $status use lock
Lock 1’s lock stays unlocked for 15 minutes
Thats better thanks Guys