code/libraries/joomlatools/library/database/behavior/lockable.php
public function lock()
    {
        //Prevent lock take over, only an saved and unlocked row and be locked
        if(!$this->isNew() && !$this->isLocked())
        {
            $this->locked_by = (int) $this->getObject('user')->getId();
            $this->locked_on = gmdate('Y-m-d H:i:s');
            $this->save();
        }

        return true;
    }
public function lock()
    {
        //Prevent lock take over, only an saved and unlocked row and be locked
        if(!$this->isNew() && !$this->isLocked())
        {
            $this->locked_by = (int) $this->getObject('user')->getId();
            $this->locked_on = gmdate('Y-m-d H:i:s');
            $this->save();
        }

        return true;
    }
public function lock ( ) { //Prevent lock take over, only an saved and unlocked row and be locked if ( ! $ this -> isNew ( ) && ! $ this -> isLocked ( ) ) { $ this -> locked_by = ( int ) $ this -> getObject ( 'user' ) -> getId ( ) ; $ this -> locked_on = gmdate ( 'Y-m-d H:i:s' ) ; $ this -> save ( ) ; } return true ; }
Lock a row

Requires an 'locked_on' and 'locked_by' column

@return boolean	If successful return TRUE, otherwise FALSE
Lock a row