What is the best approach to handle new validation for existing records where duplicate IDs exist?

Currently I have a form where users can enter in the same ID (text) for each new record they create. I now want to add validation so that duplicate ID's cannot exist going forward.

Some of these records are locked and cannot be edited, so there may be a case where two records have the same ID and cannot be edited and are then used somewhere else.

My questions are:

  1. What is the best approach to handle new validation for existing cases, do I just rename them without telling the user: xyz_1, xyz_2, xyz_3?

  2. Users can currently edit the records (including changing the ID), however, if the user wants to edit another field in this record and then saves - the validation will show up "you have a duplicate record" - how can I handle this?

Hopefully that makes sense

Thanks, Sam