UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qevlaZSDy8CMu8z6xmNErGaFda13bzNloeDxNLmCIAQ=' 
WHERE 
  key_id = '26e45fbb93024f34fdd7c5b4acf779eeaecb7d1c156466dfadca7b9f325304b4' 
  AND (
    token = 'qevlaZSDy8CMu8z6xmNErGaFda13bzNloeDxNLmCIAQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043