Hi,
You can make an SQL advanced were you select all tasks with the deadline passed (need to see if you need more filters because of all conditions, p.e. the previous status) and updated them all for the new status. With this you perform a bulk operation that is much more eficient that the foreach iteration.
With that you don't need to make more code in your action that the timer is running and don't need input parameters.
Hope this can help!
Best regards,
Ricardo M Pereira