If you mean the short-time locks placed on Office documents by SharePoint, I described a method how to remove such locks using FrontPage Server Extensions (FSE) requests sent via JavaScript in this post.
In first step you should invoke the getDocsMetaInfo method to get some info regarding the lock (like its ID, release date, etc.), then construct and post an XML to the CellStorage web service to request the release of the lock.
However, I prefer to release such orphaned locks via PowerShell as described here.
For example (if the file is locked by the current user):
$ft = New-Object System.TimeSpan(10000)
$file.Lock([Microsoft.SharePoint.SPFile+SPLockType]::Exclusive, "test lock", $ft)
$file.UndoCheckOut()
or (if the file is locked by another user):
$web = Get-SPWeb http://intranet.contoso.com
$list = $web.Lists["DocLib"]
$item = $list.GetItemById(2)
$file = $item.File
$userId = $file.LockedByUser.ID
$user = $web.AllUsers.GetByID($userId)
$impSite= New-Object Microsoft.SharePoint.SPSite($web.Url, $user.UserToken);
$impWeb = $impSite.OpenWeb();
$impList = $impWeb.Lists[$list.Title]
$impItem = $impList.GetItemById($item.ID)
$impFile = $impItem.File
$impFile.ReleaseLock($impFile.LockId)