Replace a trunk lock by opening the trunk, removing any trim that covers the lock access hole, removing the old lock and installing the new one. If the lock is worn so the key no longer works, but the car has electric locks or an interior trunk release, activate the mechanism and access the trunk for replacement. If there are no other means of opening the trunk, drill a hole through the lock center, and open the lid.
Purchase a replacement lock from a locksmith. If the problem is only with the key cylinder pin, locksmiths can reproduce a it from the numbers on the lock so the original key does not require replacement. Replacing the cylinder requires removing the lock and reinstalling it after changing the parts.
Use a screwdriver to remove any screws or plastic clips holding the trim over the access port. Once the trim is out of the way, remove the bolts that hold the lock in place, and push it to the outside of the trunk lid.
If replacing the lock cylinder pin, press a pick into the small hole on the side of the cylinder, and push the face of the lock. The pin should exit through the opposite side of the cylinder, making room for inserting the new unit.