Preventing doubles by unique_id's may not be an issue, but it is a solution.
Create a new table that has exactly the same structure as the old table, except: add a unique constriant on the column that should not contain duplicates.
Then do something like
INSERT INTO table SELECT * FROM othertable;
And your new table will reject all duplicates for that single column.