Ver originalBEGIN;SELECT idFROM turnsWHERE estado = 2 AND servicio_id = 2ORDER BY idLIMIT 1;UPDATE turns SET estado = 1 WHERE id = 1COMMIT;