I am having difficulty following your description, but I think your problem is in how to do the 'dupe elim'. When you receive a new pair to add, first check if it is valid (not a dupe MAC or launcher_id). If it is a dupe, just ignore that entry and go to the next. You should not need to delete any data, just ignore the new data that is a dupe.