UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'l69A1bQCiJc1eUQ19SsO7M9wvqLbu66WD27IJEk8F00=' 
WHERE 
  key_id = '7eacee169f306f648e1e812a37366ccff3543b6ed38f3e0dd07358ae727d7f9d' 
  AND (
    token = 'l69A1bQCiJc1eUQ19SsO7M9wvqLbu66WD27IJEk8F00=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033