Giving your hand a rest is very important. Rest improves blood circulation and relaxes tension in the muscles and tendons. Even just giving yourself a five minute break to relax your hand every now and then could make a big difference. Place your arm, from fingertips to the elbow, on a flat surface and simply let it be at ease. Maybe even massage it a bit. Before ending your relaxation, start opening and closing your fingers slowly, this will allow some blood to circulate to the hand before returning back to work mode. Another possibility that may give your sore hand a break would be to try to use the other hand while working. It might be difficult, but it would give extra rest to the affected hand. The more rest you give, the better the results.
Extra tip: Always warm up your hand before starting a task. Do some stretching. Carpal tunnel prevention stretch is a good exercise. Just place your hand on the table or a flat surface. Start pressing it gently. Increase the force gradually to where you feel comfortable. Do it for 3-5 minutes. Repeat this exercise in breaks. Do it for 1-2 minutes during a break.