UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DuWmca/MUscjn6ZCXx10rVkzv/sWgiP6HPUraFtzWaU=' 
WHERE 
  key_id = 'e98e6ee25558f17abfd8000ea15d8332e282288d3d603b51f7d918d5eae1c444' 
  AND (
    token = 'DuWmca/MUscjn6ZCXx10rVkzv/sWgiP6HPUraFtzWaU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039