There are several problems that can cause that. One is your brake light switch could be bad? The micro switch in the gear selector could be failing? Or if you have spilled anything in the past, the column lock cable would be sticking? When the problem happens, check to see if the brake lights come on. If it does then you need to remove the side panel on the center console on the driver side. On the side you will see the lock cable. Insert key and trurn to position 2 with out starting. You should see the cable move freely. Then turn it off, the cable should slide back freely. Turn the key like that several times and make sure the cable does not bind. If it does get some WD-40 and spray the cable down and cleanup the spillage. If that is ok then tap on the brakes several times and should hear a clicking noise in the center console. If you dont then the micro switch is bad and you would need to remove the center console to replace.