I sometimes hear melodies at malls and near schools prior to closing. Is there a term used for closing music? I researched 閉鎖音楽. Can other terms be used?
There is no single-word term for that. But the idea can be easily described as:
閉店 is of course a closing of a shop. Replace it with 下校, 閉館 or 閉園 according to what you need to say (for example, 下校の音楽). Alternatively you can say something like お店や学校が閉まる時の音楽.
閉鎖音楽 does not make any sense to me.
If you want the title of that song you typically hear in the evening, see: Hotaru No Hikari.