Japan records first ‘cruelly hot day’ as temperatures pass 40C