Does the vehicle have to be locked for this offense?
No. The motor vehicle does not have to be locked for you to be charged with second-degree trespass. Even entering into the open bed of a pick-up truck could constitute the necessary entering of the vehicle for the crime to be charged. The entrance only has to be unlawful in order for it to constitute a criminal offense.