An Egyptian court sentenced 23 pro-democracy activists on Sunday to three years in prison for holding an unlicenced protest, after international calls to free the defendants.