Actually, reading the rules, you don't lose all your movement for the turn:
During an investigator’s Movement Step, he may move his figure
to one adjacent space. Since an investigator may perform two
Movement Steps during his turn, he may move up to two spaces
and perform an action (which could be to possibly move to a
You get TWO Movement Steps in a turn.
If the player is unable to discard the proper card or solve the
puzzle, then he cannot enter the room this turn (and wasted
this Movement Step). When a moving investigator encounters
an ability saying “this door is locked,” his figure remains in its
current room and cannot move for this Movement Step.
Note that is says the player wasted "this" Movement Step, and cannot move for "this" Movement Step. So, the investigator wastes the Movement Step he used to try to enter the locked room. However, if that was his first Movement Step, the investigator still has a second Movement Step with which to move. Do note that it specifically says that failing to succeed vs the lock means the investigator cannot enter the room this TURN, so using the second Movement Step to attempt the lock a second time is invalid.
Keep in mind that a LOCK puzzle is not an obstacle, so you cannot use an action as well as a movement, and vice versa. So, a single investigator will never be able to attempt a single puzzle twice in the same turn.