UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1/68LjBs2xCnYNY5YlJCIFpx89MzGp2AWoaz4HUOR0Y=' 
WHERE 
  key_id = 'd2230797d6055035f61b499fde5540191a7cfaa2aea82b81c70c334e4acf2323' 
  AND (
    token = '1/68LjBs2xCnYNY5YlJCIFpx89MzGp2AWoaz4HUOR0Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018