When I press the "lock" switch for the pedestrian gate, it does not work.

Check that other buttons for opening the gate aren't stuck.