Previously, set_token skipped saving the replaced access token whenever
a previous token entry already existed. If a client refreshed again with
its current refresh token before making a valid API request (such as
after going idle until expiry), a dropped response would leave the
server holding an older access token and cause a hard logout.
Let callers explicitly specify whether to clear, replace, or preserve
the previous access token.