Release prior row locks beforehand in LinksUpdate::updateCategoryCounts