Ver originalUPDATE turns SET estado = 1 WHERE id = (SELECT idFROM turnsWHERE estado = 0 AND servicio_id = 2ORDER BY id LIMIT 1);