Changed getLockedBalance and added SQL

* New SQL file for upgrade includes next changes
* Properly calculate getLockedBalance based on shares

Further addresses #70