I've heard that the best practice is to make the ttl a lot longer than
you expect (or set it not to expire), and then have a cron job set the
new value periodically.
It doesn't sound like a lot of fun to maintain, but probably more fun
than trying to figure out the concurrency issues with any approach
that lives within a web request.
P