Use atomic exchange instead of CAS in try_lock()