Adds optimistic locking to refreshing token to support multi-thread or multi-process use of sessions with same tokens