I've figured it out after looking at the walkthrough, although I'm not sure if this reply is too late or not.
You need to go inside the playroom (the room with the claw machine), avoid John and exit it again.
After that the character should lock the door by himself.
Hope I could help.