whereKey($channel->id)->lockForUpdate()->firstOrFail(); if ($locked->exportsOccupations()) { $body = $this->feed->build($locked); $this->parser->parse($body); $locked->forceFill(['export_snapshot' => $body, 'export_snapshot_at' => now()]); } $locked->forceFill(['last_export_requested_at' => now()])->saveQuietly(); return $locked->export_snapshot; }); } }