I made an animation with bones/rig and I'm trying to preview it at 60fps, but it is only is shown at 40-30fps.
Is it possible to fix this somehow?
From your comment, I gather that the FPS text is red, and below the desired rate. This is perfectly normal sadly, and just means your computer can not calculate the frames fast enough to keep up.
The displayed frame-rate is the actual number of frames calculated per second, and is displayed in red to let you know that is not the actual rate of playback. Notice that if it is going at full speed it will display the FPS text in white.
Try cutting down on Modifiers, especially the subsurf ones, as this will exponentially increase the speed.
Aside from trying to increase viewport performance, you can also use an opengl render to pre-render each frame, then play them back at the proper frame rate.
Set the frame start and end, and the output format/path:
Any format works fine (even image sequences), but if you want sound you'll need to specify a format and codec which supports it (e.g. h.264).
Click the openGL render button either in the header of the 3D view, or in Info > Header > Render:
Note that you must be in camera view (Numpad 0) if you want to render from the camera, otherwise the current 3D view orientation will be used.
You can quickly display the rendered opengl animation (or any rendered animation for that matter) by pressing ⎈ CtrlF11. Do note that this quick player doesn't support sound.
If you need sound, you might want to use an external video player or the VSE.