LSTM model on different time scales
What you could do is just try and bypass the rest of the network after the LSTM if it isn't the 5'th minute.
Depending on your framework this can be easy or a painstakingly task compared to the alternative.
The alternative is just running and throwing away the output that isn't the next 5'th minute. While the last may seem inefficient it's rather easy to implement and takes just a bit more execution time. If execution time isn't a problem it's the easiest to get started with, if it doesn't work for your task you can always change it.