Lock client while modifying session