Starting with the locked lock, the current number on the dial is the last number in the code (you knew that). Turn the dial clockwise slowly until you hear a click (or feel the 2nd tumbler kick in). Take note of where on the dial that click takes place and subtract 2; that is the second digit in the code. Continue turning clockwise until you hear another click (or feel the 3rd tumbler), and turn the dial 2 more notches clockwise; this is the first number in the code. Now turn the dial counterclockwise, passing zero once and stopping at the 2nd number of the code, and finally dial clockwise to the last number.
This works because the second tumbler remains in place after the lock is closed (but we subtract two because we are coming in on the opposite side from how the 2nd number is normally dialed in), and the 1st tumbler is very close to where it should be in order to open the lock. After the code is dialed into a Masterlock, and the shackle is closed, it throws the 1st tumbler counterclockwise a bit so that it does not open if the user neglects to spin the dial after locking. On the multitude of padlocks I tested (two), it throws the tumbler about two or three divisions, so dialing down 2 divisions after hearing it click tends to put it in place.