2 INSERT INTO verification_in_progress (id, topic_id
, callback
, claimant
, claimed
, claim_expires
)
3 SELECT id, topic_id
, callback
, $
(claimant
) AS claimant
, now() AS claimed
, now() + $
(claimTimeoutSeconds
)::text::interval AS claim_expires
4 FROM verification_needed
6 FOR UPDATE OF verification_needed SKIP LOCKED
7 ON CONFLICT (topic_id
, callback
) DO UPDATE
9 claimant
= $
(claimant
),
11 claim_expires
= now() + $
(claimTimeoutSeconds
)::text::interval