UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'x/2QCVlFgCoAR3QkwZ7VomojzTPsp2vCsVxLpG34pu0=' 
WHERE 
  key_id = 'de13a2a8bb6c81684deedb87c42cbce4c8d7e8b9f2128231a93c5a38ea75b7b3' 
  AND (
    token = 'x/2QCVlFgCoAR3QkwZ7VomojzTPsp2vCsVxLpG34pu0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025