No, the OST needs to be for an imaginary game and needs to follow the theme. However, after the jam ends you can use your OST however you like, including for another game jam.
So to sum it up: the OST must be made before the game is made.