After the OR, make that a trigger: Motion changes to active
Both triggers and conditions subscribe to attribute changes - this means when motion becomes inactive, that trigger would be false, along with the one above the OR - this will cause the ELSE to execute. So you just need to use a trigger for motion as well.