How to force upgrade an app to new version (that has live users)

The tech team is rolling out an essential upgrade on our app. This includes essential security updates that cannot be procrastinated by users for later.

One way this will be prompted is when users launch the app. But there's a group of users that haven't closed the app. I'm considering how to push this prompt to upgrade to this group of users currently using the app without disrupting their current activity on the app.

e.g. if they were in the final payment step in the checkout and this update was forced onto them, their online shopping progress would be lost and they may not try again.

One solution is that the app will continuously check its current version as a background service, but would only prompt users when they are on non-critical flows on the app.

Would appreciate any feedback suggestions on this.