Welcome to Android Central! In order for your 2 year old to have created a new pattern lock, he or she would have had to create it, then duplicate it. That'd be a pretty surprising feat for a kid that age. What phone do you have? If you fail the unlock enough times, does it prompt you for your Google information?
Be aware that if you do a factory reset, it will be considered an unauthorized factory reset because you didn't properly remove the existing Google account from the phone first. With Google's Factory Reset Protection, this means that after the reset is done, you'll have to enter the correct Google account information and password again before you can proceed to the Setup Wizard. Do you remember your Google account and password?