There are reasons for an account to be locked. Multiple Logins using different passwords locks the account and the lock time could be 24 hours.
To solve this issue and to check if you can get back to that account again, try to login not by Yahoo Messenger, but by mail of Yahoo which has the same user name and password that has been locked. Sometimes, this step works, but make sure after you login to yahoo mail, you have to update your password, and then you can login to yahoo messenger with a new password that you have just created.
Thanks & Regards