UPDATE wm
SET WelcomeEmailSendingUtc = @Now FROM dbo.WorkspaceMembers wm
WHERE wm.WorkspaceId = @WorkspaceId
  AND wm.UserId = @UserId
  AND wm.WelcomeEmailSentUtc IS NULL
  AND (
    wm.WelcomeEmailSendingUtc IS NULL
   OR wm.WelcomeEmailSendingUtc
    < DATEADD(MINUTE
    , -10
    , @Now)
    );