title: Unify and simplify MySQL commands
body: <p>I did some MySQL commands, however it was a bit slow to execute because there are three commands executed at the same time.</p>
  
  <p>How can I unite all in just one command and simplify the code to make it faster?</p>
  
  <pre><code>UPDATE bidbutler b
      LEFT JOIN auction a on b.auc_id=a.auctionID
      LEFT JOIN auc_due_table c on b.auc_id=c.auction_id
      SET b.butler_status=0
      WHERE b.auc_id=a.auctionID
      AND b.auc_id=c.auction_id
      AND b.butler_status&lt;&gt;0
      AND a.auc_status=3
      AND c.auc_due_price&lt;&gt;a.auc_final_price
      AND c.auc_due_time=a.total_time;
  
  DELETE t1
      FROM won_auctions t1
      LEFT JOIN auc_due_table t2 ON t1.auction_id = t2.auction_id
      LEFT JOIN auction t3 ON t1.auction_id = t3.auctionID
      WHERE t1.auction_id = t2.auction_id
      AND t1.auction_id = t3.auctionID
      AND t2.auc_due_price&lt;&gt;t3.auc_final_price
      AND t2.auc_due_time=t3.total_time
      AND t3.auc_status=3;
  
  UPDATE auction a
      LEFT JOIN auc_due_table b on a.auctionID=b.auction_id
      SET a.auc_status=2
      WHERE a.auc_status=3
      AND a.auctionID=a.auctionID
      AND b.auc_due_price&lt;&gt;a.auc_final_price
      AND b.auc_due_time=a.total_time;
  </code></pre>
  
  <p>The three commands will be executed at the same time through a database procedure, which is executed every second by an event.</p>
  
  <p>NEW DELETE UPDATED:</p>
  
  <pre><code>DELETE t1
      FROM won_auctions t1
      JOIN auction t2
          ON t1.auction_id = t2.auctionID
      LEFT JOIN auc_due_table t3
          ON t3.auction_id = t1.auction_id
          AND t3.auction_id = t2.auctionID
          AND t3.auc_due_price&lt;&gt;t2.auc_final_price
          AND t3.auc_due_time=t2.total_time
      WHERE t2.auc_status=3;
  </code></pre>