Distributed locks are a classic "we need this for one thing" infrastructure trap. We had a Redis-based mutex serving exactly one code path: making sure a webhook's side effects ran once even when Paddle re-delivered the same event.
pg_try_advisory_xact_lock(hashtext($event_id)) does the same job in five characters per call, with no extra dependency, and tied to the same transaction that writes the side effect. If the transaction rolls back, the lock disappears. If it commits, the work is durable. We deleted the Redis dependency the same week.