Lock tables when applying diff (as in update)