To stop any music that is currently playing call STOPMUSIC.
With ISMUSICPLAYING() you can test whether the music is currently playing or not.
PLAYMUSIC "Music.mp3", TRUE
PRINT "Music!", 100, 100
if ISMUSICPLAYING() = TRUE then STOPMUSIC // GLBasic does this automatically when ending