If the phone had a Google account attached, then you can request a PIN in order to unlock the phone. Also, a working Internet connection is needed for the phone to send the recovery PIN to the attached email. In other case, you will need to reset the phone to factory defaults.