UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5zu1N69bxWPXdbl3pKE6NffWsuAc6lTrwNbD/I6262U=' 
WHERE 
  key_id = '8ffd9738d5b0db4a9f3e994d2d096560a65f8602245a1dbab08e52fb643ec05b' 
  AND (
    token = '5zu1N69bxWPXdbl3pKE6NffWsuAc6lTrwNbD/I6262U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039