diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php
index 40b769d2b062c90c5c7a3f6fb2e07985ce441a8f..f6270d36e7addcffe5c1fdd341c02a44dda56226 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -174,6 +174,7 @@ class SwiftFactory {
 		}
 
 		if (!$hasValidCachedToken) {
+			unset($this->params['cachedToken']);
 			try {
 				list($token, $serviceUrl) = $authService->authenticate($this->params);
 				$this->cacheToken($token, $serviceUrl, $cacheKey);