Update key and id