Don't do it!
If the iphone is locked that most likely means its stolen, because any owner would unlock it before selling it. It also means you cant really even use it. This means they don't have the password to unlock it, and you can't even wipe the iphone to reset it, that password is required to do this. Just remember it doesn't matter what excuse they give you, they just want to make the sale and unload it and you cannot get around this icloud lock.