Update only rows that need updating