How to turn the handle when the door is closed

you could use a sequence node to trigger both for when the door is not locked.