As you need to do mass maintenance involving user locking and unlocking, you can opt for using SU10 transaction.
You can also access this from SAP Menu by navigating to this path −
Tools → Administration → User Maintenance → User mass maintenance. In SAP system, you have different transactions under User Maintenance that you can use for different purpose.
T-Code − SU10 User Mass Maintenance
You can select multiple users at one time and lock/unlock them directly. To select multiple users, you need to select a checkbox and click on lock/unlock button.