I would say that when the truck with the lock icon is illuminated, the immobiliser has an issue.
It could be worth getting your key copied at a auto lock shop in case the transponder chip is on the way out, hence the intermittent issue.
As for the camshaft sensor, if the light was on with a fault code for camshaft sensor, some garages will unfortunately just replace the part, reset the light and hope for the best.
Sometimes this works, sometimes it doesn't.
The light can also come on with a camshaft sensor code if the wiring to the sensor is degraded, the camshaft sensor reference pick up is damaged, or more usually in the case of persistent camshaft sensor faults it can be because the timing belt or chain has worn and the ecu is picking up on the fact that the camshaft and crankshaft are not perfectly aligned.
In rare cases, it can be down to the crank shaft sensor and related systems that the ecu is using to calculate the expected camshaft position from but this is less likely.
I would start with the basics, does the wiring look okay and what history does the cambelt or chain have.
Do you have the error code that the garage decided to replace the sensor from, often there is more information in the specifics of the fault code.
Do you have any access to diagnostic equipment?