UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vkcZulU9gWqdni0gn5qCFkcCiHHtCtANrR1gO9wZ2Gk=' 
WHERE 
  key_id = '951e6ec8ad9c937da152e4f17cd28e36e3c8d9a165be6b8bb553af4cbbf90837' 
  AND (
    token = 'vkcZulU9gWqdni0gn5qCFkcCiHHtCtANrR1gO9wZ2Gk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018