--- memcache-lock.inc__3.txt	2009-12-18 14:22:20.000000000 +0200
+++ memcache-lock.inc	2009-12-19 02:07:37.000000000 +0200
@@ -42,7 +42,7 @@ function lock_acquire($name, $timeout = 
   $mc = dmemcache_object('semaphore');
   $key = dmemcache_key($name, 'semaphore');
   $result = $mc->get($key);
-  if ($result && $locks[$name] > $now) {
+  if ($result && ($result->lock_expire == $locks[$name]) && $locks[$name] > $now) {
     if ($mc->set($key, $lock, FALSE, $timeout)) {
       $locks[$name] = $expire;
     }
