For somebody who has played so long about 4 years ago I had an embarrassing but instructive experience.
I can do solo's but I learnt them parrot fashion and if I did improvise I'd be lucky to stay in key. I was a month away from playing 2 gigs where the band I sing with asked me to do the solos because the lead guitarist was going away. This would mean a lot of work but the rhythm guitarist would be carrying the main guitar backbone.
I was talking to another musician about my concerns and he just said "Learn your pentatonic scale" but I wouldn't have any saying I was too old at 54 to get into that nonsense. He wouldn't let it drop and the following day he texted me with the same advice.
I Googled pentatonic scale, saw a picture of Em scale on the 12th fret and suddenly had the formula where to play the notes which just so happened to be the notes I played but now I knew where they were
I told a work colleague and the following day he came in with a picture showing Em all over the neck and for me it sank straight in so I put a blues backing track on and I was up and down the neck like Eddie Van Halen.
I then played different blues backing tracks in different keys and it all slotted into place and the two gigs went smoothly with me getting a bit more respect.
I'm quite embarrassed that in 42 years of gigging I'd never known this secret but my lead guitarist who is considered one of the best in the City still doesn't know - some people don't need to I suppose.
I then put that theory into practise with my keyboard playing and was playing like Jon Lord within minutes (well 1% like him).
I'm very jealous of my 15 year old nephew who has been learning theory since the age of 5. He can pick a piece of music up and be playing drums, guitar, keyboards and bass immediately. At the age of 12 he was offered a place in all the major music colleges for his drumming.