UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Y/nd8MrFDiKl07iVAZ00doiUHwl39SK1GuAOcg2LlMQ=' 
WHERE 
  key_id = '26fa236b1bf7ef15fdcbcf9da5be02dad60c22691b24b9adc2004c7f2311daab' 
  AND (
    token = 'Y/nd8MrFDiKl07iVAZ00doiUHwl39SK1GuAOcg2LlMQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030