A deadlock happens when two transactions hold locks the other needs (A waits for B, B waits for A). Reduce them by locking rows in a consistent order, keeping transactions short, and avoiding unnecessary `FOR UPDATE`.