It would take a couple queries, but you could do it in three steps.
- Query the stats server to get a list of all the ids that are there, and save it to a file.
- Load the id file to a temp table on the primary table, then query for all records where the ids do not match
- Run the inserts for all records from step 2 into the stats table.