Race condition on shared Table from Parallel processes

Dear community,

I am encountering a race condition on a shared table 'AccProductGroup'.

I have 2 processes that can run in parallel (from 2 machines), which they read an item from the table and they write it if it's not present.

We have many duplicates, so I assume it's a Race Condition.

Which mechanisms does One Identity offer to handle such scenarios keeping in mind performances?

(e.g. locks, Semaphores, UnitOfWork, ....)

Many many thanks

Frens