diff --git a/perun/proxy/utils/oracle2postgresql.py b/perun/proxy/utils/oracle2postgresql.py
index 62ee83274cae9f378679be5af9a08bdfe3afaedf..079b0fa9fdaba37b502f5ddd3474a3a46726df9f 100644
--- a/perun/proxy/utils/oracle2postgresql.py
+++ b/perun/proxy/utils/oracle2postgresql.py
@@ -171,7 +171,7 @@ class Oracle2PostgreSQL:
         insert_text = text(
             f'INSERT INTO "{self.table_for_imported_attributes}" (uid, attribute, value) '
             "VALUES (:uid, :attribute, :value) "
-            "ON CONFLICT (id) DO UPDATE SET id = EXCLUDED.id"
+            "ON CONFLICT (uid,attribute,sp,expires) DO NOTHING"
         )
         with self.postgresql_engine.begin() as conn:
             for username in usernames: