UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WHvodhPNuMctQV83aCLJ4JuOWlPHnsQwat9eaAKnMiU=' 
WHERE 
  key_id = '91e6e1f54fc3fe3a94fad52ddf2756c9261d19d14a69269da0083d19a582cde7' 
  AND (
    token = 'WHvodhPNuMctQV83aCLJ4JuOWlPHnsQwat9eaAKnMiU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035