UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iticuEP+JyfmlaNA+huBTYYfJTfDqgIatW6Mz7NTdiU=' 
WHERE 
  key_id = '82cf32d16f7915e9812a598330fe64c50481c9843c4c89cbf7657e7388877831' 
  AND (
    token = 'iticuEP+JyfmlaNA+huBTYYfJTfDqgIatW6Mz7NTdiU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016