UPDATE vs INSERT INTO... ON DUPLICATE KEY UPDATE
The fastest operation will be the one that has the most chances of succeeding immediately.  You should find out what happens more often: inserting new rows or updating old ones.   Code accordingly.