http://foro.elrincondetolito.com/viewtopic.php?t=20
Cómo realizar con MySQL un insert y un update en una misma query