UPDATE mra_eis_outbox
SET status = 'ready',
    submitted_at = NULL,
    last_error = 'Previous submission had no verifiable MRA EIS validation URL and was reopened.'
WHERE entity_type = 'sale'
  AND status = 'submitted'
  AND (
      validation_url IS NULL
      OR validation_url = ''
      OR (validation_url NOT LIKE 'http://%' AND validation_url NOT LIKE 'https://%')
  );