diff --git a/lib/RateLimiter.js b/lib/RateLimiter.js
index <HASH>..<HASH> 100644
--- a/lib/RateLimiter.js
+++ b/lib/RateLimiter.js
@@ -20,10 +20,8 @@ class RateLimiter {
   consume(key, rate = 1) {
     return new Promise((resolve, reject) => {
       const rlKey = RateLimiter.getKey(key);
-      const tempKey = `tmp${rlKey}`;
       this.redis.multi()
-        .setex(tempKey, this.duration, 0)
-        .renamenx(tempKey, rlKey)
+        .set(rlKey, 0, 'EX', this.duration, 'NX')
         .incrby(rlKey, rate)
         .pttl(rlKey)
         .exec((err, results) => {
@@ -32,7 +30,7 @@ class RateLimiter {
           if (err) {
             reject(new Error('Redis Client error'));
           } else {
-            const [,, consumed, resTtlMs] = results;
+            const [, consumed, resTtlMs] = results;
             if (resTtlMs === -1) {
               msBeforeReset = this.duration;
               this.redis.expire(rlKey, this.duration);
Improved: use set command with NX flag