Print: 
1x box
1x corresponding lid

Place lid onto box and thread a piece of filament through the box and lid or a paper clip (depending on preference or printer tolerances).