Grrr... I tried responding earlier, but the board crapped out on me
Each lock is composed of up to 9 tumblers. As your rogue tries them, they turn either black (if not in use) or gold (if they're in use and he or she succeeds). If you abort your attempt to pick the lock and start over, the tumbler setting remains the same.
One of the tricks I use in the early game is to try to pick the lock and see which tumblers are involved. If my rogue starts working on a tumbler that isn't in use, I abort and start over. Amazing how easy it can be to pick locks if you only work on the active tumblers...