The main publishing location for this model is on GitHub. Go to the GitHub page of this model for the latest updates and more detailed instructions.
Go to my site for an overview of my other models. Only a few of them are published on Printables.
(You might find this same model on Printables under a different name. This is the original. This is a remix of 2 models that currently are only on Thingiverse, see links below.)
My godson has some kind of obsession with collecting small things in small chests, and he wanted a chest with a working lock. So, for his next birthday I took athey's Small Hinged Treasure Chest and applied the following upgrades:
To unlock the chest, rotate the key counter-clockwise and open the lid while keeping the key turned. The lock cannot be left in the open position, closing the chest automatically locks it. This video demonstrates how the chest works.
I made 4 different key designs, although the skull key might be the most popular with little (and big) children by far :)
Don't print this as one of the first things you have ever printed. At the least, print some accuracy and overhang tests and make sure they check out right.
See the instructions on this model's Github page.
If you make a remix, it should have the same Share Alike license as this model, and obviously there must be a visible reference back to this model (either to its GitHub page, or this Printables page).
Again, more details are on the GitHub page.
You should print the ‘easy’ lid model, this has slightly less usable inner volume but is much less prone to cause warping and prints failing.
If you're not yet 100% familiar with what your printer can handle, print the lower chest and lid separately. This is a lengthy print, and especially the lid can sometimes cause problems. You wouldn't want the entire print to fail due to a problem with only the lid.
Settings:
When using PrusaSlicer, you can rely on modifiers to increase the number of perimeters around the regions of the hinges.

3MF files and pre-sliced files for the i3 MK3S are provided, they include this perimeters tweak as well as some variable layer height to get a nicer finish on the lid. You can adjust the 3MF files to match your particular printer.
The regular size chest is 76×51×58 mm.
If you want to print the chest at 200% size, print the models with Size200 prefix. These are already upscaled to 200% (meaning about 152×102×116 mm), and have been modified with reduced wall thickness and appropriate tolerances for the size. You may need to experiment with various infill settings for the ‘Size200-Latch_lower’ part to end up with something that has the right amount of springiness.
Push the hinges into each other. (If things break while doing this, you will have problems with many other prints as well, and you need to work on improving layer adhesion.)
Make sure to remove any traces of a ‘squashed’ first layer (elephant's foot syndrome) on the latches and hole in the lid, through sanding or scraping with a knife. Try hooking the latches into each other with your hands: they shouldn't easily slip out of each other. If they get unhooked easily, try to adjust the hook shape with a knife.
If the latches are too thick to fit in the slots, sandpaper is your friend, or you could print them again scaled down slightly in the Z axis to make them thinner.

The lower latch (long piece) must be mounted in the chest with the hook pointing to the right, and the top perfectly flush with the edge (simply pushing it in on a flat table should do the trick). If you cannot push it deep enough, scrape off some material from the bottom end.
The latch in the lid must have its hook pointing to the left, and ideally the edges of the square part should be flush with the bottom edge of the lid. If the lock doesn't catch, you either need to pull this latch out again by a fraction of a millimeter, or shave off a bit of material with an X-acto knife.

If the lid doesn't close easily due to the latch bumping against the top edge of the chest, try sanding or scraping a bit of material from the front edge of the latch.
When printed accurately at the original scale of the model, the parts should fit tightly enough that no glue is required. If they are too loose, apply either glue or strips of tape as shown in the image below.
The advantage of not using glue is that the latches will pop out of their sockets if the chest is pulled open with excessive force, instead of breaking and leaving bits behind that are impossible to repair. In other words, you need to make a choice between a chest that is harder to open without a key but will be broken if someone does manage to open it; or a chest that is easier to open but can be repaired if needed. After all this is just a toy, not a secure storage device!

The author remixed this model. Imported from Thingiverse.