daemon-rewrite/mysql: Use REPLACE instead of INSERT ... ON DUPLICATE KEY UPDATE ...