FIX: skip insertion if the row already exists. (PR #10011)

If an invite is redeemed before the query is ran then there will be an index violation error. For those cases we should skip inserting the conflicting row.

GitHub