Advanced flow: concurrency limit on a flow

So basically I created an advanced flow to automatically close the gate after about 90 seconds after it has been opened. That sounds really simple but it isn’t.

One obvious issue is: I do not have a concrete trigger other then checking every 10 seconds if the gate is open or not after which we start an advanced flow with timers etc. In this case I need to be sure that only one instance of this flow is running at a time. I do this with a boolean right now.

But is there a more simple way to limit the concurrency or do “locking mechanisms”?

Maybe, your problem is clearer, when you share the Flows, you made.

Check the Advanced Triggers app
It can (re)start a flow with several smart options
Example flow: