diff --git a/token_custom.module b/token_custom.module
index 06de8f0..b40ce79 100644
--- a/token_custom.module
+++ b/token_custom.module
@@ -489,7 +489,7 @@ function token_custom_token_render($machine_name, $code, $data, $options) {
      * Add a random hash to make sure no other encapsulated token_replace call
      * will get the same (or change) this $data array.
      */
-    $static_key = 'token_custom_' . drupal_random_bytes(10);
+    $static_key = 'token_custom_' . uniqid(mt_rand(), TRUE);
 
     /*
      * Store value in static cache and leave it there.
