A campaign occasionally sends twice even though only one row appears in the queue. Two workers may be reading the same waiting job before either marks it as claimed.
Inspect the transaction boundary
Record when each worker reads, claims and submits the item. The claim needs to be exclusive at the storage layer used by the queue, not just a temporary variable inside one PHP process.
With JSON storage, use the application's shared locking and atomic-update mechanism consistently. A second code path that bypasses the lock can reintroduce the race even if the main worker is careful.
Make recovery explicit
A crashed worker should not leave a job permanently stuck, but an expired claim also needs cautious recovery. Distinguish a job that never submitted from one whose external result is uncertain. Releasing every old claim directly into the queue can create duplicates after a slow response.
Test two concurrent workers against fictional recipients and a fake transport. Check counts and state transitions without sending real mail. Save attempt identifiers so an operational retry remains traceable.
Preventing duplicate claims and handling uncertain delivery are separate problems. A reliable queue needs a policy for both.