UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EdbeLqFMph5HEd4hziJm4+d/rK8Tg2wk56uZi5Gf1RI=' 
WHERE 
  key_id = 'bcfadea52a869cd9a36ea569499ddf81fb693621bd79b593417377a1716fa986' 
  AND (
    token = 'EdbeLqFMph5HEd4hziJm4+d/rK8Tg2wk56uZi5Gf1RI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028