code: protected function releaseLock($name)
      {
          $releaseStatus = null;
          $this->db->useMaster(function ($db) use ($name, &$releaseStatus) {
              /** @var \yii\db\Connection $db */
              $db->createCommand(
                  'DECLARE
      handle VARCHAR2(128);
  BEGIN
      DBMS_LOCK.ALLOCATE_UNIQUE(:name, handle);
      :result := DBMS_LOCK.RELEASE(handle);
  END;',
                  [':name' => $name]
              )
              ->bindParam(':result', $releaseStatus, PDO::PARAM_INT, 1)
              ->execute();
          });
  
          return $releaseStatus === 0 || $releaseStatus === '0';
      }
docs: Releases lock by given name.
  @param string $name of the lock to be released.
  @return bool release result.
  @see http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lock.htm