correcting ON DUPLICATE KEY UPDATE syntax