Magnetocaloric effect in M5XB2 family compounds