diff --git a/includes/lock.inc b/includes/lock.inc
index 7259ad9..a906dd9 100644
--- a/includes/lock.inc
+++ b/includes/lock.inc
@@ -114,7 +114,7 @@ function lock_acquire($name, $timeout = 30.0) {
     $retry = FALSE;
     // We always want to do this code at least once.
     do {
-      if (@db_query("INSERT INTO {semaphore} (name, value, expire) VALUES ('%s', '%s', %f)", $name, _lock_id(), $expire)) {
+      if (@db_query("INSERT INTO {semaphore} (name, value, expire) VALUES ('%s', '%s', '%f')", $name, _lock_id(), $expire)) {
         // We track all acquired locks in the global variable.
         $locks[$name] = TRUE;
         // We never need to try again.
