I was also wondering what happens here:
So in the case motion was detected after 30 seconds it will again check for motion, if no motion was detected your flow would turn the light off. But what happens if there was motion detected, the light would just be kept on and never turned off, am I right? I am thinking about adding some kind of node in there that would loop until the motion state is clear if that makes sense and then continue with the light off flow.
Update: I have added a wait until node which seems to works quite nice: