locking/static_keys: Rework update logic