The timer is not the reservation
A checkout timer is a small promise: this space is yours for a while. Drawing the countdown is easy. Keeping that promise when somebody closes their laptop is the interesting part.
Same countdown. Different reservation.
The browser kept renewing its lease.
Seconds left on the server lease
The tempting solution is to release the reservation when the tab closes. Except browsers do not reliably say goodbye, especially on phones. The server can be left holding space for somebody who has gone.
A short lease gives silence a meaning. Whilst the page is active, it asks the server to keep the reservation. Each successful renewal moves the lease forward, but never beyond the original checkout deadline. Stop hearing from the page and the lease runs out.
That is the shape I like: the ordinary path renews, the abandoned path expires, and neither needs a perfect final message.
Payment makes it more delicate. Somebody approving a bank challenge has also left your page. Treat that silence as abandonment and you can release space whilst they are paying. Payment state has to join the decision.
Like the phosphor on this site, the visible effect needs a system underneath it. Otherwise the timer is just a very convincing animation.