private function reserveNext(array $next, Connection $db)
    {
        $lockID = $this->getLockID();

        // First update the table
        try {
            $date = new \DateTime('now');
            $date->setTimestamp($date->getTimestamp() + $this->timeout);

            if (!$db->update($this->table, [
                $this->lockColumn => $lockID,
                $this->lockTimeoutColumn => $date->format('Y-m-d H:i:s')
            ], $next)
            ) {
                return false;
            }
        } catch (\Exception $e) {
            return false;
        }

        return $this->matchingLock($lockID, $next, $db);
    }