If it is, then you need an attorney to look at the original lease.But that would be a strange lease. New York State law allows a tenant to install a lock, but requires that the tenant provide a key to the landlord on request. A lease cannot ordinarily invalidate state law. New York City law requires that a landlord install a lock on the front door and provide the tenant with a copy of the key (landlord keeping a key)
New York State law and New York City law (requires for the landlord installed lock that the tenant have a copy of the key) while allowing the tenant the right to install a lock meeting certain specifications, also requires that the tenant provide a copy of the key to the lock to the landlord if requested to do so (NYS law).
"***Locks, Peepholes and Mail
Tenants in multiple dwellings can install and maintain their own locks on their apartment entrance doors in addition to the lock supplied by the landlord. The lock may be no more than three inches in circumference, and tenants must provide their landlord with a duplicate key upon request. (Multiple Law §51-c; NY Admin. Code §27-2043)***"
"***Every tenant of a multiple dwelling, except a tenant of a multiple dwelling under the supervision and control of a municipal housing authority, occupied by him, except as a hotel or motel, or college or school dormitory, shall have the right to install and maintain or cause to be installed and maintained in the entrance door of his particular housing unit in such multiple dwelling, a lock, separate and apart from any lock installed and maintained by the owner of such multiple dwelling, not more than three inches in circumference, as an ordinary incident to his tenancy, provided that a duplicate key to such lock shall be supplied to the landlord or his agent upon his request; and every provision of any lease hereafter made or entered into which reserves or provides for the payment by such tenant of any additional rent, bonus, fee or other charge or any other thing of value for the right or privilege of installing and/or maintaining any such lock shall be deemed to be void as against public policy and wholly unenforceable.***"
The answer provided to you is in the nature of general information. The general proposition being that you should try to avoid a bad outcome if you can.