I don’t know Logo and am not quite sure what your rule is doing, but offer a possible alternative approach.
I have lighting controlled by by pulse relay types. There are physical push-on, push-off buttons for manual control.
openHAB has an Item for a simulated pushbutton, and another Item monitoring the light circuit actual state (on or off).
I don’t use timers for simulated pushbutton release, it works like this -
UI or rules send command to “Light” Item (autoupdate is disabled).
A rule listens for commands and if command ON/OFF does not match current light state, issues a command to “pushbutton”
A rule listens for “Light” state changes.
If simulated “pushbutton” is pressed, release it and also do anything else that needs to be done, this was an automatic event.
If our “pushbutton” not pressed, it was a manual event and we can do whatever might be needed for that case.