Use a lock to safely check and update the time for the next roam event