Miscellaneous Functions MySQL Tutorial

VALUES(col_name) in the UPDATE clause refers to the value of col_name that would be inserted.

INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)
ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);