Move table updating logic to a background queue