Guard private update-related variables with an update lock

These variables can be accessed from multiple threads in the same
time, and if it happens, then it can cause a crash. There was a lock
for it already, it only wasn't used.