While I’m not positive it will suit your specific use case, it sounds like you might be interested in a Machine to Machine flow which is designed specifically for a scenario between systems where there is no user involved.
Regarding token renewal in a M2M flow, please take a look at the following thread: