You only check once during begin play if the button has been pressed.
Create an event dispatcher inside of the button. Then once it’s timeline “blue button time” has finished call the dispatcher.
Inside of the door on begin play after getting the reference to the blue button pull out a pin from it’s variable and bind to it’s dispatcher (it will create an event after the binding with a red line connecting it)
Move the rest of the code (branch, timeline and rotation) to this newly created event.
button
door
Though it might be better to just expose the button reference variable and set it in the scene.
You can then have more than one button and door and reuse it.