When self-locking, I really like the feature that reads and displays random codes on the screen to help you try to forget the correct code. I propose to take that one step further:
Add a keypad and require the user to type out the codes as they are displayed and read. So for example, maybe make them key in 20 random sequences. For an extra twist, you could even gamify it a bit by offering a x% reduction on time if the sequences are all keyed in correctly with in y seconds and for each incorrect keyed sequence, a x% penalty. To make it even more difficult, make the numbers on the keypad appear out of order and change with each sequence.
All of this forces the user to concentrate on the bogus number sequences being put in front of them rather than the original sequence.
I also suggest this because I'm using ChastiKey for storing pin numbers that are being entered on a keypad. And in my case, I often find myself remembering the pattern that I typed on the keypad even if I don't remember the actual numbers. Having to simulate typing other bogus numbers on a keypad will help to erase that pattern from my mind.