UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nJGDCZsuoSM41xdZvNOEn75Ln0LQccb++fea2ndC+i0=' 
WHERE 
  key_id = 'c73eca81f4c197568a8e80d420ea1abc6d214a051a98cf29a68c066ec4b377a0' 
  AND (
    token = 'nJGDCZsuoSM41xdZvNOEn75Ln0LQccb++fea2ndC+i0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00061