There has been a discussion about this here:
Keep in mind that a Lock is flipped over when an investigator tries to move into a room. Obstacles and exploration cards are only flipped over when an investigator explores.
… anyway - the Lock card is revealed when the investigator tries to move into the room, and it places a darkness token in the room. Because of the darkness, an investigator needs to spend both the action and an additional move to explore the room. If the investigator had already used both his move steps, he cannot explore this turn.
Did that answer your question?