Lock entries before updating.