Lock puzzles have a long history.
Chinese jewelry boxes often contain trick locks and hidden drawers. An example of such a box is an integral part of the plot of the movie Shanghai Knights. Clive Barker has written a number of horror stories (including The Hellbound Heart, which was made into the movie Hellraiser) centered around Lemarchand's box which appears to be such a puzzle box but in fact opens the gates to Hell when manipulated.
Other lock puzzles stem from the necessity to invent secure locks in the Middle Ages.
Lock puzzles are closely related to puzzle boxes.