title: Using findOneAndUpdate and $inc to execute an action only once
body: <p>Imagine an app where the first user to increment a counter wins a prize. Here's how I'm trying to implement it.</p>
  <p><strong>Schema</strong></p>
  <pre><code>const PrizeSchema = {
   name: string;
   counter: {
     type: Number,
     default: 0
   }
  }
  </code></pre>
  <p><strong>Claim logic</strong></p>
  <pre><code>function claimPrize () {
    const filter = { name: 'HugePrize' };
    const update = { $inc: { counter: 1 } };
    const options = { new: true }
    const prize = await PrizeModel.findOneAndUpdate(filter, update, options)
    if (prize.counter === 1) {
      console.log('Yay! You've won!')
    } else {
      console.log('Sorry! You're too late')
    }
  }
  </code></pre>
  <p>My assumption here is that <code>findOneAndUpdate</code> will never return two documents with the same counter. Is it true? Is there any chance there will be two winners?</p>