UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nEXG6i/px3ORDUOTkgPyGDAfwGWEt31mFCh8NT/TaS8=' 
WHERE 
  key_id = '7027864611bcbe17339608310966917328a4a62dbb6a35ccfdf3ef30fd369f9c' 
  AND (
    token = 'nEXG6i/px3ORDUOTkgPyGDAfwGWEt31mFCh8NT/TaS8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030