Update database after changing cart