I always did "INSERT ... ON CONFLICT DO NOTHING".
Does that queue when the table is locked? Or just skip writes entirely whenever there is a transaction?