Okay. FYI, shareholders in a corporation are not partners. The legal differences between shareholders and partners are profound, and I don't want to go in one legal direction, when the other is called for.
That said, if each shareholder owns the same number of common shares in the corporation, and neither shareholder has been appointed President or Chief Executive Officer (which is the same thing), then neither shareholder can control the office lease to the exclusion of the other, and you could simply break into the office.
However, if the other shareholder were appointed CEO, and you were not appointed to a post that permitted you to exercise control over the lease (e.g., Chief Operations Officer, or the like), then by your having previously granted the other shareholder effective control over the management of the corporation, you would have lost your ability to do so, because as a 50% owner, you cannot force a board of director resolution to change the previously made officer appointments.
If the latter is your circumstances, then you will have to sue your coowner in court to dissolve the corporation, or offer to buy him/her out, or offer to sell your shares, etc.
If the former, then you can break the lock and tell your co-shareholder to suck eggs.