There are multiple issues with the locks in DayZ right now:
1. People can see the code update in their UI, even though someone else is supposed to be holding the lock in their hands, changing the digits - in reality this would not work, as there is only one lock and people on the other side of the fence should not be able to see it. Even on the same side it would be hard, because people would naturally use their bodies to block line of sight.
2. As soon as the digits are showing the correct code, the lock falls off immediately - this is not realistic. You would have to actually try and pull at the lock, each time you entered a new code, to verify it has opened. This could be easily implemented with a short animation doing some rattling sound, if the code is still wrong.
The current implementation allows for malicious abuse (I can go into more detail privately) cracking the locks very easily and should be changed ASAP.