It is not possible to avoid duplicates when importing .tmx files that contain changes to the existing TM entries. Only TM entries that are identical to the existing ones will not be imported and hence, they will not be added to the existing TM.
Even if the source or target translation of the TM entries has not been changed, there might be other changes such as different file origins, created by, modified by, previous and following segments, etc.
The only time a new TM entry is not created is when a segment is translated multiple times in the same project.
TM maintenance is then required after an import if there is a need to remove duplicates. More details of that can be found in these articles:
Worldserver - How to search for and delete duplicate entries from Translation Memories?WorldServer - how to search a Translation Memory based on the Entry Origin and using wildcard ("*")WorldServer - How to search the Translation Memory by Entry Origin but without repetitions in the Search results?