diff --git a/includes/lock.inc b/includes/lock.inc
index 0bc6786..7dbe116 100644
--- a/includes/lock.inc
+++ b/includes/lock.inc
@@ -96,8 +96,6 @@ function _lock_id() {
 function lock_acquire($name, $timeout = 30.0) {
   global $locks;
 
-  // Insure that the timeout is at least 1 ms.
-  $timeout = max($timeout, 0.001);
   list($usec, $sec) = explode(' ', microtime());
   $expire = (float)$usec + (float)$sec + $timeout;
   if (isset($locks[$name])) {
@@ -154,9 +152,11 @@ function lock_may_be_available($name) {
   $now = (float)$usec + (float)$sec;
   if ($now > $lock['expire']) {
     // We check two conditions to prevent a race condition where another
-    // request acquired the lock and set a new expire time.  We add a small
-    // number to $expire to avoid errors with float to string conversion.
-    db_query("DELETE FROM {semaphore} WHERE name = '%s' AND value = '%s' AND expire <= %f", $name, $lock['value'], 0.0001 + $expire);
+    // request acquired the lock and set a new expire time. Note that due to
+    // floating point precision errors, the two conditions may not be consistent
+    // within milliseconds of the timeout, but this will correct itself in the
+    // following call to this function.
+    db_query("DELETE FROM {semaphore} WHERE name = '%s' AND value = '%s' AND expire <= %f", $name, $lock['value'], $now);
     return (bool)db_affected_rows();
   }
   return FALSE;
