grazie...

risolto con "ON DUPLICATE KEY UPDATE"...