Prefer lock_guard over unique_lock

We don't need to pass it to a condition
variable here.

No functional change.