Project 12 Randomly read values

Als already described in
http://forum.arduino.cc//index.php?PHPSESSID=oqfmdc8kc0c1oc69hrbi8skpm3&topic=175831.0
there are two problems with this sketch. One is solved with the code here
http://forum.arduino.cc/index.php?topic=175831.msg1383787#msg1383787

the second problem with randomly unlocking isn't solved yet as it seems me.
Any further suggestions, ideas?
Thanks!
Peter