UPDATE npc_types INNER JOIN pets ON npc_types.id = pets.npcID AND pets.npcID < 29000 SET hp = hp * 8;