This project on Thingiverse is just about amazing. It’s a complete lock and key set made entirely using open source plans and a printed on a Makerbot. It can only be opened using the right key (or, given it’s made of plastic, a lighter) but it’s the engineering that clearly counts here.
Again, all items are printable except for the springs which I removed from ball-point click pens (thankfully my wife is still putting up with disassembled pens around the house). This one is a little more complicated but it still works and makes a good desk oddity. If you were to glue the “Top”, “Retainer”, and “Lid” in place, the only way to get this lock open without the key would be to break it. But, what is the fun if you can’t take it apart?
You can even build a unique key for every lock but filing down the internal pins. Why would you want to build one of these? Because you can.