Switch to a lock for registry updates for better concurrency control

In the very unlikely case where applying registry updates take > than the update periodicity, a subsequent update thread can trample the previous (still updating) thread.