How to perform a webform_submission query with a conditional based on a custom field in the submission data
You first need to select the Submission IDs (SIDs) from the table webform_submission_data:

$select = \Drupal::service('database')
  -&gt;select('webform_submission_data', 'wsd')
  -&gt;fields('wsd', array('sid'))
  -&gt;orderBy('wsd.sid', 'DESC')
  -&gt;condition('wsd.webform_id', $webform_id, '=')
  -&gt;condition('wsd.name', 'paid', '=')
  -&gt;condition('wsd.value', 1, '=')// Not sure how your BOOL value is saved
  -&gt;execute();

// Get all the results.
$results = $select-&gt;fetchAll(\PDO::FETCH_COLUMN);


Then you need to use entity_load_multiple() or similar to load the entities:

if (count($results) &gt;= 1) {
  $submissions = \Drupal::entityTypeManager()
    -&gt;getStorage('webform_submission')
    -&gt;loadMultiple($results);

  foreach ($submissions as $submission) {
    // Do something
  }
}


Drupal.org thread Reference for basis of my answer.