Green’s Dictionary of Slang

zip one’s lip v.

also use the zipper, zip one’s mouth, …trap, zipper one’s mug, ...trap, ...yap
[SE zip + lip/mouth/mug n.1 (1d)/trap n.1 (5)]

[1930s+] (orig. US) to stop talking; esp. in imper.