UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6UDEVoTRG13KNzLgLKcDbWChIEz4IkIScANIc/SDSsI=' 
WHERE 
  key_id = '7bcc0f6681ae959e199bcba29a203f62ea2291c18844a5016798fbfbc1a1ac8d' 
  AND (
    token = '6UDEVoTRG13KNzLgLKcDbWChIEz4IkIScANIc/SDSsI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027